<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
<head>
<%@ include file="/include/resources.jsp" %>
<script type="text/javascript" src="msi/questionnaire/questionnaire.js"></script>
</head>
<body>
<input type="hidden" id="tableId" value="<s:property value='tableId'/>"/>
<div style="padding:5px;background:#fafafa;border-bottom:1px solid #eee;">
	<table cellpadding="0" cellspacing="0" style="width:100%">
		<tr>
			<td>
				<a id="btn-submit1" href="#" class="easyui-linkbutton" plain="true" iconCls="icon-save" onclick="addSelectQuestion();">确定</a>
			</td>
			<td align="right">
				<a href="#" class="easyui-linkbutton" plain="true" iconCls="icon-cancel" onclick="javascript:$('#selQuestionDialog').dialog('close')">关闭</a>
			</td>
		</tr>
	</table>
</div>
<div style="width:706px;height:428px;">
	<div class="easyui-layout" fit="true">
		<div region="west" split="true" title="样题库分类" style="width:200px;">
			<div>
				<ul id="sortTree"></ul>
			</div>
		</div>
		<div region="center" style="background:#fafafa;width: 300px">
			<table id="questionSelectList"></table>
		</div>
	</div>
</div>
<script type="text/javascript">
	$('#sortTree').tree({
		url: 'searchSort.do',
		onClick:function(node){
			var title = node.text;
			var url = "searchQuestion.do?question.sortId="+node.id;
			$("#questionSelectList").datagrid({
				width : 360,
				url:url,
				title:title,
				idField:"questionId",
				fit:true,
				singleSelect:false,
				pagination:true,
				rownumbers:true,
				columns:[[
				{field:'questionId',checkbox:true},
				{title:'标题',field:'questionTitle',width:300,align:"left"},
				{title:'类型',field:'questionType',width:60,align:"left"}]]
			});
		}
	});
</script>
</body>
</html>